package com.whmskj.xjlhsc.mobie.ProductionManagement.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.whmskj.xjlhsc.controller.vo.Result;
import com.whmskj.xjlhsc.mobie.ProductionManagement.pojo.vo.ElectronicYarnClearerVO;
import com.whmskj.xjlhsc.mobie.ProductionManagement.service.imp.ElectronicYarnClearerServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author jiaruchun
 * @date 2025-08-25 13:28
 * 电子纱清除器报告
 */
@SaIgnore
@RestController
@Api(tags = "电清分析接口")
@RequestMapping("/mobile/ProductionManagement/electronicYarnClearer")
public class ElectronicYarnClearerController {

    @Autowired
    private ElectronicYarnClearerServiceImpl electronicYarnClearerService;
    /**
     * 电子纱清除器报告
     * @return
     */
    @ApiOperation(value = "根据类型查询电子纱清除器报告",notes = "返回类型查询电子纱清除器报告集合，元素String dayDate;  // 日期，例如 \"2025-07-04\"\n" +
            "Double value;    // 对应 type 的值")
    @GetMapping("/{type}")
    public Result getElectronicYarnClearerReport(@PathVariable(value = "type") Integer type) {
            List<ElectronicYarnClearerVO> electronicYarnClearerReport = electronicYarnClearerService.getElectronicYarnClearerReport(type);
            return Result.success(electronicYarnClearerReport);
    }
}